package application

import (
	"activity/domain/core/vo"
	"fmt"
	"github.com/gin-gonic/gin"
)

func (handler Handler)Lottery(c *gin.Context) {

	idParam := c.Param("id")

	idVO := vo.NewId()
	id, err := idVO.Decode(idParam)
	if err != nil {
		fmt.Print(err)
	}

	// 获取奖池
	pp := handler.repPrizePool.Get(id)
	fmt.Print(pp)

	// 计数器

	// 条件

	// 抽奖

	//

	c.JSON(200, gin.H{
		"id": id,
		"pp": pp,
	})
}

